package main

import "fmt"

// 结构体定义
type person struct {
	name string
	age  int8
	city string
}

func main() {
	var p2 = new(person)
	p2.name = "小王子"
	p2.age = 29
	p2.city = "广州"
	fmt.Printf("p2= %#v\n", p2) // p2= &main.person{name:"小王子", age:29, city:"广州"}
}
